import Core.JDMySQLDB as JDMySQLDB
import datetime

if __name__ == '__main__':

    # 通过配置文件的方式，连接数据库
    from Core.Config import *
    pathfilename = os.getcwd() + "\..\Config\config2.json"
    config = Config(pathfilename)
    database = config.DataBase("JDMySQL")
    realtime = config.RealTime()

    # 最简单读取数据
    df = database.GetDataFrame("Factor", "a_sys_factor", {"Name": "UnRestrict_Amt"}, projection=["date", "value"])
    print(df)
